package x.trident.core.domain.result;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @FileName:       PageResult.java
 * @ClassName:      PageResult
 * @Description:    分页结果集
 * @Author:         zza
 * @CreateDate:     2023/5/10 2:25 下午
 * @UpdateUser:     zza
 * @UpdateDate:     2023/5/10 2:25 下午
 * @UpdateRemark:   说明本次修改内容
 * @Version:        v1.0
 */
@Data
@EqualsAndHashCode(callSuper = true)
@JsonIgnoreProperties({"orders", "optimizeCountSql", "searchCount", "countId", "maxLimit", "hitCount"})
public class PageResult<T> extends Page<T> {

    private static final long serialVersionUID = 229980954651956813L;

    public PageResult(long page, long size) {
        super(page, size);
    }

    public PageResult(long page, long size, long total) {
        super(page, size);
        setTotal(total);
    }

    public PageResult(long page, long size, long total, long pages) {
        super(page, size);
        setTotal(total);
        setPages(pages);
    }

}
